﻿<!DOCTYPE html>
<html>
<head>
	<meta charset=utf-8 />
	<title></title>
    
    <?php include('includes/dependencies.php'); ?>   
	
</head>

<body>
    <div id="container" class="container">

		<!-- HEADER -->    
		<?php 
			$activeLink = "products";
			include('includes/header.php'); 
		?>   

		<div id="content">
        	<?php include('includes/leftProductMenu.php') ?>
			
			<?php 
				$products = Products::getInstance(); 
				
				if(!empty($_GET['pid'])) {
					$productId = $_GET['pid'];
					$currentProduct = $products->getProductById($productId);
				} 
			?>
				<div class="productInfoImageContainer">
					<img class="productInfo-img" src="resources/products/<?php echo $currentProduct->image; ?>" />
				</div>
				
				<div class="productInfo">
					<h1><?php echo $currentProduct->name; ?></h1>
					<div><?php echo $currentProduct->description; ?></div>
					<h2><?php echo $currentProduct->price; ?> Ft</h2>
					<a href="php/handleCart.php?pid=<?php echo $currentProduct->id; ?>&action=add">kosárba rakás </a>
				</div>
				
			</div>
        </div>

        <!-- FOOTER -->
        <?php include('includes/footer.php'); ?>          
    	
    </div>	
</body>
</html>